package com.rankeiot.platform.domain;

import lombok.Data;
import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;

import java.io.Serializable;
import java.sql.Types;

@Data
@Entity(tableName="t_user_role")
public class UserRole implements Serializable {
    @Id
    @Column(name="user_name",length=20L,type= Types.VARCHAR,nullable=false)
    private String username;
    @Id
    @Column(name="role",length=20L,type=Types.VARCHAR,nullable=false)
    private String role;

    public UserRole(){

    }

    public UserRole(String username, String role) {
        this.username = username;
        this.role = role;
    }
    public UserRole(String username){
        this.username=username;
    }
}
